package com.kuang.single;

/**
 * @program: juc
 * @description: 饿汉式单例
 * @author: 陈恩涛
 * @create: 2021-03-25 16:40
 **/
public class Hungry {

    //构造器私有
    private Hungry() {

    }

    // 可能会浪费空间
    private final static Hungry HUNGRY = new Hungry();

    public static Hungry getInstance() {
        return HUNGRY;
    }

}
